package com.foreveross.fetl.application.impl;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.fetl.application.IFreightPriceApplication;
import com.foreveross.fetl.common.application.BaseApplicationImpl;
import com.foreveross.fetl.common.domain.IBaseEntity;
import com.foreveross.fetl.core.domain.freight.repository.IFreightPriceRepository;

@Transactional
@Service("freightPriceApplication")
public class FreightPriceApplicationImpl extends BaseApplicationImpl
	implements IFreightPriceApplication{

	@Inject
	private IFreightPriceRepository freightPriceRepository;
	@Override
	public <T extends IBaseEntity> void create(T f) throws Exception {
		freightPriceRepository.create(f);
	}
	@Override
	public <T extends IBaseEntity> List<T> findByRowkey(String start, String end) {
		return freightPriceRepository.findByRowkey(start, end);
	}
	@Override
	public <T extends IBaseEntity> List<T> findByCondition(Map<String,Object> map) {
		return freightPriceRepository.findByCondition(map);
	}
	@Override
	public <T extends IBaseEntity> void update(T f) throws Exception {
		freightPriceRepository.update(f);
	}
}
